import {
    formInput,
} from '@/css/DialogsCss.module.scss';
export default {
    title:'新增组织',
    dialog:{
        width:600,
        type:'dialog'
    },
    onMounted: [{
        action:'print',
        value:'$params'
    },{
        action:'set',
        target: '$view',
        field:'title',
        value:'$params.title'
    },{
        action: 'set',
        target: '$widgets.form',
        field: 'value',
        value: '$params.form'
    }],
    items:[{
        region: 'center',
        layout:'vertical',
        items:[{
            id: 'form',
            widget: 'form',
            fields:[{
                class: formInput,
                itemId: 'name',
                placeholder: '请输入组织名称',
                widget: 'text',
                label: '组织名称',
            },{
                class: formInput,
                itemId: 'remarks',
                placeholder: '请输入备注说明',
                widget: 'text',
                label: '备注说明',
            }],
            buttons: [{
                value: '保存',
                type: 'primary',
                onClick: [{
                    action: 'confirm',
                    title: '表单保存',
                    message: '是否保存表单?',
                    confirm: [{
                        var: 'value',
                        target: '$widget',
                        action: 'call',
                        method: 'getValue'
                    }, {
                        action: 'service',
                        path: 'system/organization/index/save',
                        params: '$vars.value'
                    }, {
                        action: 'dialog-hide',
                        mode: 'apply'
                    }]
                }]
            }],
        }]
    }]
} ;
